package com.enjoy.cap7.bean;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
public class Plane implements ApplicationContextAware {
	
	private ApplicationContext applicationContext;
	
   public Plane() {
	   System.out.println("Plane......constructor........");
   }
   @PostConstruct
   public void init() {
	   System.out.println("Plane......init........");
   }
   
   @PreDestroy
   public void destroy() {
	   System.out.println("Plane......destroy........");
   }
   
	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		this.applicationContext = applicationContext;
	}
   
}
